var right_div2 = document.getElementById("right_div2");
alert(11)
window.addEventListener('scroll', () => {
    right_div2.onscroll = function () {
        var right_div2_top = this.scrollTop;
        var right_div2_left = this.scrollLeft;
        document.getElementById("left_div2").scrollTop = right_div2_top;
        document.getElementById("right_div1").scrollLeft = right_div2_left;
    }
})

//设置右边div宽度
document.getElementById("right_div").style.width = "" + document.documentElement.clientWidth - 130 + "px";
setInterval(function () {
    document.getElementById("right_div").style.width = "" + document.documentElement.clientWidth - 130 + "px";
}, 0);

for (var i = 0; i < 24; i++) {
    $("#left_table2").append("<tr><th>我是首列</th></tr>");
    $("#right_table2").append("<tr><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td><td>" + i + "</td></tr>");
}
